﻿<%@ WebHandler Language="C#" Class="insertModal" %>

using System;
using System.Web;
using AMCBO;
using AMCOBJ;

public class insertModal : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        //context.Response.ContentType = "text/plain";
        //context.Response.Write("Hello World");
        settings BOSettings = new settings();
        settingsObj ObjSettings = new settingsObj();
        int x = 0;
        if (!string.IsNullOrEmpty(context.Request.QueryString["brandId"]))
        {
            ObjSettings.BrandID = Convert.ToInt32(context.Request.QueryString["brandId"].ToString());
        }
        if (!string.IsNullOrEmpty(context.Request.QueryString["nModal"]))
        {
            ObjSettings.Modal_Name = context.Request.QueryString["nModal"].ToString();
        }
        if (!string.IsNullOrEmpty(context.Request.QueryString["fulProdNme"]))
        {
            ObjSettings.FulProductNme = context.Request.QueryString["fulProdNme"].ToString();
        }
        if (!string.IsNullOrEmpty(context.Request.QueryString["prodcateid"]))
        {
            ObjSettings.ProdCateID = Convert.ToInt32(context.Request.QueryString["prodcateid"].ToString());
        }
        try
        {
            x = BOSettings.insertModal(ObjSettings);
            if (x == 0)
            {
                context.Response.Write("y");
            }
            else
            {
                context.Response.Write("n");
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}